#ifndef CFALGORITHM_H_
#define CFALGORITHM_H_

#include <map>
#include <string>

#include "../startup/NewUserMethod.h"
#include "../startup/method/RandomMethod.h"
#include "../startup/method/PopularityMethod.h"

enum E_CFAlgorithm {
	CORRELATION_BASED, NAYVE_BAYES, OTHER_BASED
};

class CFAlgorithm {
protected:
	std::string active_user_mac;
	NewUserMethod* newUserMethod;
public:
	CFAlgorithm(E_NewUserMethod method = RANDOM) :
		newUserMethod(NULL) {
		NewUserMethod::method = method;
	}

	void setActiveUserMac(const std::string& user_mac) {
		active_user_mac = user_mac;
	}

	virtual double predict(int cid) = 0;
	virtual std::multimap<std::string, std::string> getTopNList(int n) = 0;
};

#endif /* CFALGORITHM_H_ */
